<template>
  <div class="max">
    <div v-for="(item, index) in list" :key="index" class="geDan">
      <div class="imgs">
        <i class="iconfont icon-24gf-playCircle" />
        <img :src="item.picUrl">
      </div>
      <div class="introduce">
        <div class="name_top">{{ item.name }}</div>
        <div class="name_button">{{ item.publishTime | publishTime }}</div>
      </div>
    </div>
  </div>
</template>

<script>
import { singerAlbum } from '@/api/singer'
export default {
  filters: {
    publishTime(val) {
      return new Date(parseInt(val / 1000)).getUTCFullYear()
    }
  },
  data() {
    return {
      list: [],
      id: 861777
    }
  },
  created() {
    this.singerAlbum()
  },
  methods: {
    async singerAlbum() {
      const { data } = await singerAlbum(this.id)
      console.log(data)
      this.list = data.hotAlbums
    }
  }
}
</script>

<style scoped lang="less">
.max {
  display: flex;
  flex-wrap: wrap;
  .geDan {
    width: 20%;
    // height: 220px;
    margin-bottom: 25px;
    .imgs {
    // width: 150px;
      height: 186px;
      width: 184px;
      transition: all 0.1s;
      position: relative;
    // height: 150px;
      border-radius: 10px;
      overflow: hidden;
      cursor: pointer;
      i {
        display: none;
        font-size: 40px;
        position: absolute;
        top: 50%;
        left: 50%;
        // backdrop-filter: blur(8px);
        // background: hsla(0, 0%, 100%, 0.14);
        color: rgba(192, 189, 189, 0.836);
        transform: translate(-50%, -50%);
        border-radius: 50%;
        padding: 0;
      }
      img {
        height: 186px;
        width: 184px;
      }
    }
    .imgs:hover {
    //   width: 150px;
      box-shadow: 2px 12px 13px #887f7f82;
    }
    .imgs:hover i {
      display: block;
    }
    .introduce {
      display: flex;
      flex-direction: column;
      margin-top: 10px;
      .name_top {
        // width: 150px;
        word-break: break-all;
        font-weight: 600;
        font-size: 16px;
        color: #000;
      }
      .name_top:hover {
        text-decoration: underline;
        cursor: pointer;
      }
      .name_button {
        // width: 150px;
        font-size: 12px;
        word-break: break-word;
      }
    }
  }
}
</style>
